package cn.tedu;

public class Hello {
    public static void main(String[] args) {
        A a = new B();
        a.methodA();
    }
}
class A{
    public void methodA(){
        System.out.println("A");
        methodB();
    }
    public void methodB(){
        System.out.println("B");
    }
}
class B extends  A{
    @Override
    public void methodA() {
        super.methodA();
        System.out.println("C");
    }
    @Override
    public void methodB(){
        super.methodB();
        System.out.println("D");
    }
}